package Level02_eight;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;

public class Test {
    public static void main(String[] args) {
        String[] array1 = {"a","b","a","c","d",};
        String[] array2 = {"e","f","a","d","g",};
        ArrayList<Object> arrayList1 = new ArrayList<>();
        ArrayList<Object> arrayList2 = new ArrayList<>();
        arrayList1.addAll(Arrays.asList(array1));
        arrayList2.addAll(Arrays.asList(array2));
        HashSet<Object> hashSet = new HashSet<>();
        hashSet.addAll(arrayList1);
        hashSet.addAll(arrayList2);
        System.out.println("合并集合为："+hashSet);
    }
}
